<div class="loding_context" *ngIf="loading" id="loding_context"></div>
<div class="modal fade addKeyWordWin" data-backdrop="static" id="viewKeywordWin">
  <div class="modal-dialog modal-lg modal-dialog-centered">
    <div class="modal-content" style="border:0px;">
      <!-- 模态框头部 -->
      <div class="modal-header">
        <h4 class="modal-title">查看主题词 — {{themeTableName}}</h4>
        <button type="button" class="close" data-dismiss="modal" (click)="_infoTheme()">&times;</button>
      </div>
      <!-- 模态框主体 -->
      <div class="modal-body">
        <div class="container">
          <div class="PI-keyWordBox">
            <div class="row">
              <div class="col-md-4">
                <div class="PI-keyWord-Left">
                  <p>主题词</p>
                  <div class="PI-keyWord-Left-input" style="height: 418px;">
                    <div class="row txtTitle">
                      <input type="text" class="input_style" placeholder="请输入主题词名称" #queryCriteria="ngModel" name="searchData"
                        (input)="changesearch()" (keyup.enter)="changesearch()" [(ngModel)]="searchData" />
                      <button class="btn btn-search btn-blue" (click)="search()" mat-button>查询</button>
                    </div>
                    <div id="divTreeDataScroll" class="row treeview treeviewBox" #scrollMe
                      style="max-height: 365px;overflow: auto;margin-top:10px;border:0px"
                      infinite-scroll
                      [infiniteScrollDistance]="2"
                      [infiniteScrollThrottle]="50"
                      (scrolled)="onScrollDown()"
                      [scrollWindow]="false"
                     >
                      <div id="tree" class="treeview">
                        <p-treeTable [value]="treeDataScroll">
                          <ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-i="index">
                            <tr class="treegrid-2 treegrid-collapsed">
                              <td class="bs-checkbox w5 text-center">
                                <input type="checkbox" #event (click)="_nodeSelect(event.checked,rowData)" id="checked_{{rowData.id}}"
                                  [checked]="rowData.isChecked" [disabled]="rowData.isChecked">
                              </td>
                              <td class="w20 text-left max-w">
                                <p-treeTableToggler [rowNode]="rowNode"></p-treeTableToggler>
                                {{rowData.name}}
                              </td>
                            </tr>
                          </ng-template>
                        </p-treeTable>
                      </div>
                    </div>
                    <div class="pagination" style="width:220px;display: none" *ngIf="treeData && treeData.length > 0">
                        <li class="page-item" [ngClass]="{'active': previousActive}"><a class="page-link" href="javascript:void(0);" (click)="onScrollUp()">上一页</a></li>
                        <li class="page-item" [ngClass]="{'active': nextActive}"><a class="page-link" href="javascript:void(0);" (click)="onScrollDown()">下一页</a></li>
                    </div>
                  </div>
                </div>
              </div>
              <div class="col-md-8 PI-keyWord-Right">
                <div class="row treeview treeviewBox" style="height:453px;" *ngIf="selectedData" [ngStyle]="{'overflow':selectedData.length > 11?'scroll':''}">
                  <table class="table table-hover table-striped tableStyle" style="border:0px;">
                    <thead>
                      <tr>
                        <th>主题词</th>
                        <th>创建日期</th>
                        <th>状态</th>
                        <th>操作</th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr *ngFor="let file of selectedData">
                        <td>
                          {{file.themeWordsName}}
                        </td>
                        <td>{{file.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
                        <td>
                          <span class="EnableColor" *ngIf="file.status === 0">启用</span>
                          <span class="DisableColor" *ngIf="file.status === -1">禁用</span>
                        </td>
                        <td>
                          <a *ngIf="file.indexing === true" style="color:#C8C8C8;">删除</a>
                          <a class="bgTaskTxt" *ngIf="file.indexing === false" (click)="_nodeSelect(false,file)">删除</a>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!-- 模态框底部 -->
      <div class="modal-footer">
        <button type="button" class="btn btn-primary" data-dismiss="modal" *ngIf="internalParam.completeStatus != '1' && internalParam.checkStatusData != 200" (click)="_addKeywordTheme()" [disabled]="_isEmpty()">确定标引</button>
        <button type="button" class="btn btn-default" data-dismiss="modal" (click)="_infoTheme()">取消</button>
      </div>

    </div>
  </div>
</div>